#pragma once

#include <map>
#include <string>
#include <memory>
#include "CTableBase.h"

class CTableManager
{
public:
	CTableManager() = default;
	~CTableManager() ;
	// Adds a table to the manager.
	void AddTable(const std::string& tableName, CTableBasePtr table);
	// Retrieves a table by its name.
	CTableBasePtr GetTable(const std::string& tableName) const;
	// Checks if a table exists by its name.
	bool HasTable(const std::string& tableName) const;
	// Removes a table by its name.
	void RemoveTable(const std::string& tableName);

	int InitAllTables();

	std::map<std::string, CTableBasePtr>& getAllTables() { return m_tableMap; }
public:
	std::map<std::string, CTableBasePtr> m_tableMap;
};

